<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">

*{
margin:0px;
padding:0px;
}

input{
width:100%;
height:100px;
}
</style>
</head>
<body>


<input id="bt1" type="button" value="button1">
<p id="pp">试验文本试验文本试验文本试验文本试验文本试验文本试验文本试验文本试验文本试验文本试验文本试验文本试验文本试验文本试验文本试验文本</p>

<script type="text/javascript" src="js/EventUtil.js"></script>
<script type="text/javascript">
var bt1=document.getElementById("bt1");
EventUtil.addHandler(bt1,"mouseout",function(event){
	event=EventUtil.getEvent(event);
	var target=EventUtil.getTarget(event);
	var relatedTarget=EventUtil.getRelatedTarget(event); //重点语句
	alert("鼠标离开了"+target.tagName+"元素而进入了"+relatedTarget.tagName+"元素");

});
</script>


</body>
</html>